﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter21.ViewModel
{
    using System.Windows.Data;
    using System.Globalization;

    [ValueConversion(typeof(object[]), typeof(string))]
    public class ValueInStockConverter : IMultiValueConverter
    {

        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            var unitCost = (decimal)values[0];
            return unitCost * (int)parameter;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
